package com.voxel.sense.infomsg.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

import com.example.com.common.utils.SizeUtils;

/**
 * Created by ChenYiYao on 2018/5/21.
 */
public class CircleNumbView extends View {
    public CircleNumbView(Context context) {
        super(context, null);
    }

    public CircleNumbView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs, 0);
    }

    public CircleNumbView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int i = SizeUtils.px2dp(20);
        super.onMeasure(i, i);

    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        int i = SizeUtils.px2dp(20);
        Paint paint = new Paint();
        paint.setColor(Color.RED);
        paint.setStyle(Paint.Style.FILL);
        canvas.drawCircle(10, 10, 10, paint);
    }
}
